﻿using System.Windows;
using System.Windows.Controls;

namespace WPFTestSolution.Pages.Controls {
    /**
     * https://www.bilibili.com/video/BV1bV411A7Eq?p=48
     * 048-DatePicker日期控件(: Control)
     * https://www.wpfsoft.com/2023/08/31/1634.html
     */
    public partial class _48_DatePicker_Page : Page {
        public _48_DatePicker_Page() {
            InitializeComponent();
            this.Title = "048-DatePicker日期控件(: Control)";
        }

        private void Button_Click(object sender, RoutedEventArgs e) {
            //查询日期
            var selectedDate = $"{_DatePickerStart.SelectedDate} - {_DatePickerEnd.SelectedDate}";
            //文本值
            var text = $"{_DatePickerStart.Text} - {_DatePickerEnd.Text}";
            this.TextBlock_Result.Text = $"{selectedDate}\r\n{text}";
        }
    }
}